1. Field of the Invention
The present invention relates to the field of code generation, and more particularly to software source code generation for mapping object fields within nested arrays.
2. Description of the Related Art
For several decades now, many business enterprises have employed computer technology within their enterprise systems to manipulate and store virtually all forms of business and technical data. This trend has of course been motivated by the recognition of the many benefits of computer technology and electronic data storage over traditional (e.g. paper-based) systems and data storage methods, including improved ease of access, efficiency of storage, flexibility, reliability and cost effectiveness. As a result, large databases of valuable business information (commonly referred to as “legacy” business or enterprise data) have been accumulated by way of these legacy systems.
An intrinsic problem associated with legacy enterprise systems however is the fact that they are difficult and costly to upgrade to accommodate new computer technology or platforms. As a result, developers of new enterprise systems may find it desirable to be able to access legacy data assets from within new enterprise systems without the need for a wholesale upgrade of legacy systems. A common method for achieving such access has been the use of mapping software. Mapping software essentially acts as an interface or conduit for data between legacy systems and new enterprise systems at run-time. More specifically, mapping software defines “connections” between legacy data entities (e.g. data structures within a legacy application) and enterprise system objects (e.g. data structures in a new enterprise application) which permit legacy data to be accessed by enterprise systems during their operation. The connections may be unidirectional in nature, in which case only a reading of legacy data into enterprise system objects is permitted, or bi-directional, wherein both a reading of legacy data into enterprise system objects and a subsequent writing of any updated data back into legacy system data entities is possible.
Manual development of mapping software is typically tedious. A developer is required to first identify legacy data entities to be mapped to enterprise system objects and thereafter to write software by hand to implement the desired mapping connection(s). In some cases the developer may be required to examine the low-level representation of various data types to ensure that the mapped entities are compatible, so that mapping errors are avoided. If the new enterprise system is implemented in a different programming language from the legacy system, the developer may be required to implement interface code between the new enterprise system and the legacy system to facilitate communication between them. In the event that the standard software development cycle of design, manual coding, test and debugging is followed, development may be slow to progress. Alternatively, when development is performed on a more ad hoc basis, mapping software may be produced more quickly, but it may contain programming errors.
In view of these difficulties, various software tools have emerged to assist in the development of mapping software. For example, tools such as Mapper Editor in the Enterprise Access Builder™ of VisualAge® for Java™ provide a graphical user interface and user controls which permit desired mapping connections to be identified in a straightforward manner and mapping software to be generated automatically after the desired connections have been specified. Such tools improve the efficiency of the mapping software development process by reducing the tedium and potential for error in creating functional mapping code as compared with manual techniques.
Known tools such as the above-described Mapper Editor allow simple and compound fields within new enterprise system objects to be mapped to corresponding fields in legacy systems, even when the enterprise system fields are contained within a “parent” array (e.g. when a new object field to be mapped is instantiated N times, with each instantiation comprising a unique element of an N-element array). Disadvantageously, however, known tools are ill-suited for facilitating the generation of mapping source code in the case when enterprise system fields to be mapped are contained within nested arrays.
Hence what is needed is a method and device to facilitate the generation of source code for mapping enterprise system fields within nested arrays to legacy data entities.